const fs = require('fs')

fs.readFile('./成绩.txt', 'utf-8', function (err, data) {
    if (err) return console.log('读取成绩失败' + err.message);

    const txt = data.replace(/=/g, ':').replace(/\s/g, '\r\n')

    fs.writeFile('./成绩-ok.txt', txt, 'utf-8', add => {
        if (add) return console.log('打印成绩失败' + add.message);
        console.log('打印成绩成功');
    })
})